<?php
require "./common/function.php";
require "./config/dbconfig.php";

$cateId = $_GET['cateId'];

$sql="SELECT a.*,b.category flname FROM t_product a LEFT JOIN t_category b on a.category=b.id WHERE a.`status` = 0";
if($cateId){
    $sql.=" and a.category='$cateId'";
}
$result = getMySql($sql,"查询热门商品信息失败");
if($result){
    if(mysqli_num_rows($result)){
        $products = mysqli_fetch_all($result,MYSQLI_ASSOC);
    }
}
require "./html/product.html";
exit;







